How to create OSLC links through dxl?

I need to create OSLC links through DXL. I tried looking through this post (https://www.ibm.com/developerworks/community/forums/html/topic?id=d0c55334-821c-4d74-ab68-dbc6e81d0f87&ps=25) but the file mentioned in the post is encrypted in our DOORS installation. The DXL Reference Manual isn't helping either.

Is it even possible to create a OSLC link to RQM/RM/RTC?

Any help would be appreciated?


dhars_priya - Tue May 24 06:39:16 EDT 2016

Re: How to create OSLC links through dxl?
DOORSHAM - Tue May 24 07:54:23 EDT 2016

Are you using Doors Web Access

Re: How to create OSLC links through dxl?
dhars_priya - Tue May 24 07:56:47 EDT 2016

DOORSHAM - Tue May 24 07:54:23 EDT 2016

Are you using Doors Web Access

Yes we are using web access. But we are trying to create OSLC links through DXL in DOORS client

 

Re: How to create OSLC links through dxl?
DOORSHAM - Tue May 24 09:30:56 EDT 2016

dhars_priya - Tue May 24 07:56:47 EDT 2016

Yes we are using web access. But we are trying to create OSLC links through DXL in DOORS client

 

9.3 version of mention script is unencrypted and here it is

// Licensed Materials - Property of IBM - some unique copyrights (i.e., the ability
// to copy, modify, distribute) may be licensed in certain circumstances
// (e.g., sample/template code intended to be used by customers to build upon and
// distribute as their own products).
//
// DOORS - %full_filespec: createNewLink.inc~6:dxl:ERS#1 %  %date_created: Mon Sep 20 13:01:01 2010 %
//
// (c) Copyright IBM Corporation 2010. All Rights Reserved.
//
// U.S. Government Users Restricted Rights: Use, duplication or disclosure restricted
// by GSA ADP Schedule Contract with IBM Corp.


#include <standard/links/editExtLinks.inc>
#include <standard/links/editCollabLinks.inc>


DB createNewLink_DB = null

DBE createNewLink_ServiceTypeFrame
DBE createNewLink_ServiceTypeSelector
DBE createNewLink_ServiceProviderList
DBE createNewLink_OkButton, createNewLink_CancelButton, createNewLink_HelpButton

Skip createNewLink_CreatableProvidersByType = null

const int createNewLink_ExternalLinkChoice = 0

bool createNewLink_SelectionMade = false

OSLCServiceProvider createNewLink_ServiceProviderChoice = null

bool createNewLink_HasProviders

// Maps the choices of the radio box, createNewLink_ServiceTypeSelector, to
// the corresponding service type
Skip createNewLink_ServiceTypeChoices = null

const int createNewLink_ProviderListWidth = 400

const int createNewLink_ProviderListRows = 12


//*************************************************************************
void createNewLink_InitServiceTypeChoices()
//
// DESCRIPTION: Fill the list which will hold the service type for each choice
//              which will be displayed to the user. The service types which
//              are displayed to the user are creatable types where there
//              is at least one provider for that service.
//              Additionally, it sets createNewLink_HasProviders to true
//              if there are any providers.
//
{
    if (null createNewLink_CreatableProvidersByType)
    {
        getOSLCServiceProvidersByCreatableType createNewLink_CreatableProvidersByType
    }

    if (!null createNewLink_ServiceTypeChoices)
    {
        delete createNewLink_ServiceTypeChoices
    }
    createNewLink_ServiceTypeChoices = create

    int choiceNum = createNewLink_ExternalLinkChoice + 1
    createNewLink_HasProviders = false
    Skip providers
    for providers in createNewLink_CreatableProvidersByType do
    {
        OSLCLinkType serviceType = getOslcLinkTypeFromUri((string key createNewLink_CreatableProvidersByType))
        createNewLink_HasProviders = true
        put(createNewLink_ServiceTypeChoices, choiceNum++, serviceType)
    }
}


//*************************************************************************
void createNewLink_InitServiceProviderChoices(
    OSLCLinkType serviceType) // IN: The requested service type
//
// DESCRIPTION: Fill the list box with the service providers for the
//              specified service type
//
{
    if (null createNewLink_CreatableProvidersByType)
    {
        getOSLCServiceProvidersByCreatableType(createNewLink_CreatableProvidersByType)
    }

    int providerNum = 0
    Skip providers
    empty createNewLink_ServiceProviderList
    if (findOslcProvidersForType(createNewLink_CreatableProvidersByType, serviceType, providers))
    {
        OSLCServiceProvider service
        for service in providers do
        {
            insert(createNewLink_ServiceProviderList, providerNum++, service.title)
        }
    }
}


//*************************************************************************
OSLCServiceProvider createNewLink_GetProvider(
    OSLCLinkType serviceType, // IN: The requested service type -
    string providerTitle)     // IN: The title of the service provider
//
// DESCRIPTION: Find the service provider for the specified service type
//              and with the specified title.
// RETURNS:     The service provider which matches or null if not found
//
{
    Skip providers
    if (findOslcProvidersForType(createNewLink_CreatableProvidersByType, serviceType, providers))
    {
        OSLCServiceProvider service
        if (find(providers, providerTitle, service))
        {
            return service
        }
    }
    return null
}


//*************************************************************************
OSLCServiceProvider createNewLink_GetProvider(
    OSLCLinkType serviceType, // IN: The requested service type -
    int providerIndex)        // IN: The position in the provider skip list
                              //     where the provider was located
//
// DESCRIPTION: Find the service provider for the specified service type
//              and with the specified list index.
// RETURNS:     The service provider at that location or null if not found
//
{
    if (null serviceType || providerIndex < 0)
    {
        return null
    }

    Skip providers
    if (findOslcProvidersForType(createNewLink_CreatableProvidersByType, serviceType, providers))
    {
        int count = 0
        OSLCServiceProvider service
        for service in providers do
        {
            if (count++ == providerIndex)
            {
                return service
            }
        }
    }
    return null
}


//*************************************************************************
void createNewLink_UpdateEnabledStates()
//
// DESCRIPTION: Updates the enabled states of the controls to match the
//              current state.
//              The OK button is only enabled when the link type is
//              external or when there is a selected service provider.
//              The service privder list os only enabled when the link
//              type is not an external link.
//
{
    int serviceTypeChoice = get createNewLink_ServiceTypeSelector
    if (createNewLink_ExternalLinkChoice == serviceTypeChoice)
    {
        inactive createNewLink_ServiceProviderList
        active createNewLink_OkButton
    }
    else
    {
        active createNewLink_ServiceProviderList
        int selectedProvider = get createNewLink_ServiceProviderList
        ((selectedProvider != -1) ? active createNewLink_OkButton : inactive createNewLink_OkButton)
    }
}


//*************************************************************************
OSLCLinkType createNewLink_GetSelectedLinkType()
//
// DESCRIPTION: Get the link type which the user has selected.
// RETURNS:     The OSLC link type the user has selected or null if the
//              user selected external link.
//
{
    const int choice = get(createNewLink_ServiceTypeSelector)

    OSLCLinkType selectedType
    if (find(createNewLink_ServiceTypeChoices, choice, selectedType))
    {
        return selectedType
    }

    return null
}


//*************************************************************************
void createNewLink_ServiceTypeCB(
    DBE theButton) // IN: affected control
//
// DESCRIPTION: Call back for when the selected service type is changed.
//              This will update the list of providers to show the
//              providers of the selected service type. If the type is
//              external link, the list of providers is cleared.
//              Updates the status of the OK button to match the new state.
//
{
    int serviceTypeChoice = get(createNewLink_ServiceTypeSelector)
    if (createNewLink_ExternalLinkChoice == serviceTypeChoice)
    {
        empty createNewLink_ServiceProviderList
    }
    else
    {
        createNewLink_InitServiceProviderChoices(createNewLink_GetSelectedLinkType())
    }
    createNewLink_UpdateEnabledStates()
}


//*************************************************************************
void createNewLink_ServiceProviderCB(
    DBE theList) // IN: affected control
//
// DESCRIPTION: Call back for when the selected service provider changes.
//              Updates the status of the OK button to match the new state.
//
{
    createNewLink_UpdateEnabledStates()
}


//*************************************************************************
void createNewLink_HelpCB(
    DBE theButton) // IN: affected control
//
// DESCRIPTION: Call back for when the help button is pressed.
//
{
    helpOnEx(createNewLink_DB, DOORSHelp, helpObjectPropertiesExtLinks)
}


//*************************************************************************
void createNewLink_CancelCB(
    DBE theButton) // IN: affected control
//
// DESCRIPTION: Call back for when the cancel button is pressed.
//              This causes the dialog to be closed without creating
//              any kind of link.
//
{
    createNewLink_SelectionMade = false

    hide createNewLink_DB
    release createNewLink_DB
}


//*************************************************************************
void createNewLink_OkCB(
    DBE theButton) // IN: affected control
//
// DESCRIPTION: Call back for when the OK button is pressed.
//              This causes the dialog to be closed and will cause the
//              appropriate link creation dialog to be displayed.
//              Display of the new dialog cannot be done here (no nested
//              modal dialogs) so that must wait until after function
//              block returns.
//
{
    createNewLink_SelectionMade = true

    OSLCLinkType serviceType = createNewLink_GetSelectedLinkType()
    int providerIndex = get(createNewLink_ServiceProviderList)
    createNewLink_ServiceProviderChoice = createNewLink_GetProvider(serviceType, providerIndex)

    hide createNewLink_DB
    release createNewLink_DB
}


//*************************************************************************
void createNewLink_CloseCB(
    DB db) // IN: affected dialog box
//
// DESCRIPTION: Call back for when the dialog is closed.
//              This will behave just like pressing the cancel button.
//
{
    createNewLink_CancelCB(createNewLink_CancelButton)
}


//*************************************************************************
void createNewLink(
    DB parent) // IN: parent dialog box
//
// DESCRIPTION: Present the create new link dialog to the user. This dialog
//              allows the user to select either an external link or a
//              link to one of the OSLC service providers for a creatable
//              service type. The appropriate follow-up dialog will be
//              presented depending upon the selection made by the user.
//
{
    createNewLink_InitServiceTypeChoices()

    if (createNewLink_HasProviders)
    {
        if (null createNewLink_DB)
        {
            string title = LS_("String_New_Link", NLSTEMP_("New Link"))
            createNewLink_DB = create(parent, title, styleFixed | styleCentred | styleSubWindow | styleThemed | styleAutoparent)
            if (null createNewLink_DB)
            {
                errorBox(getExtMsg("String_Failed_to_create_dialog_box", NLSTEMP_("Failed to create dialog box")))
                return
            }
        }

        // Create an array for the radio box's choices
        int choiceCount = 0
        OSLCLinkType choice
        for choice in createNewLink_ServiceTypeChoices do
        {
            ++choiceCount
        }
        string serviceTypeSelectorChoices[choiceCount + 1]
        serviceTypeSelectorChoices[createNewLink_ExternalLinkChoice] = LS_("String_External", NLSTEMP_("External"))
        for choice in createNewLink_ServiceTypeChoices do
        {
            const int choiceNumber = (int key createNewLink_ServiceTypeChoices)
            serviceTypeSelectorChoices[choiceNumber] = getLocalisedOslcLinkTypeName(choice)
        }

        //
        // Build the dialog box's elements
        //

        createNewLink_ServiceTypeFrame = frame(createNewLink_DB, LS_("String_Select_the_type_of_link_that_you_want_to_create", NLSTEMP_("Select the type of link that you want to create:")))
        createNewLink_ServiceTypeSelector = verticalRadioBox(createNewLink_DB, (NLS_("")), serviceTypeSelectorChoices, 0)
        const string nlZeroList[0] = {}
        createNewLink_ServiceProviderList = list(createNewLink_DB, LS_("String_Select_a_service_provider", NLSTEMP_("Select a service provider")), createNewLink_ProviderListWidth, createNewLink_ProviderListRows, nlZeroList)

        createNewLink_HelpButton = button(createNewLink_DB, LS_("String_Help", NLSTEMP_("Help")), createNewLink_HelpCB, styleStandardSize)
        createNewLink_CancelButton = button(createNewLink_DB, LS_("String_Cancel", NLSTEMP_("Cancel")), createNewLink_CancelCB, styleStandardSize | styleIsCloseBtn)
        createNewLink_OkButton = button(createNewLink_DB, LS_("String_OK", NLSTEMP_("OK")), createNewLink_OkCB, styleStandardSize | styleIsDefault)

        //
        // Lay out the dialog box's elements
        //

        createNewLink_ServiceTypeFrame->(NLS_("top"))->(NLS_("form"))
        createNewLink_ServiceTypeFrame->(NLS_("left"))->(NLS_("form"))
        createNewLink_ServiceTypeFrame->(NLS_("bottom"))->(NLS_("unattached"))
        createNewLink_ServiceTypeFrame->(NLS_("right"))->(NLS_("form"))

        createNewLink_ServiceTypeSelector->(NLS_("top"))->(NLS_("inside"))->createNewLink_ServiceTypeFrame
        createNewLink_ServiceTypeSelector->(NLS_("left"))->(NLS_("inside"))->createNewLink_ServiceTypeFrame
        createNewLink_ServiceTypeSelector->(NLS_("bottom"))->(NLS_("inside"))->createNewLink_ServiceTypeFrame
        createNewLink_ServiceTypeSelector->(NLS_("right"))->(NLS_("unattached"))

        createNewLink_ServiceProviderList->(NLS_("top"))->(NLS_("spaced"))->createNewLink_ServiceTypeFrame
        createNewLink_ServiceProviderList->(NLS_("left"))->(NLS_("form"))
        createNewLink_ServiceProviderList->(NLS_("bottom"))->(NLS_("unattached"))
        createNewLink_ServiceProviderList->(NLS_("right"))->(NLS_("form"))

        createNewLink_HelpButton->(NLS_("top"))->(NLS_("spaced"))->createNewLink_ServiceProviderList
        createNewLink_HelpButton->(NLS_("left"))->(NLS_("unattached"))
        createNewLink_HelpButton->(NLS_("bottom"))->(NLS_("unattached"))
        createNewLink_HelpButton->(NLS_("right"))->(NLS_("form"))

        createNewLink_CancelButton->(NLS_("top"))->(NLS_("spaced"))->createNewLink_ServiceProviderList
        createNewLink_CancelButton->(NLS_("left"))->(NLS_("unattached"))
        createNewLink_CancelButton->(NLS_("bottom"))->(NLS_("unattached"))
        createNewLink_CancelButton->(NLS_("right"))->(NLS_("spaced"))->createNewLink_HelpButton

        createNewLink_OkButton->(NLS_("top"))->(NLS_("spaced"))->createNewLink_ServiceProviderList
        createNewLink_OkButton->(NLS_("left"))->(NLS_("unattached"))
        createNewLink_OkButton->(NLS_("bottom"))->(NLS_("unattached"))
        createNewLink_OkButton->(NLS_("right"))->(NLS_("spaced"))->createNewLink_CancelButton

        set(createNewLink_ServiceTypeSelector, createNewLink_ServiceTypeCB)
        set(createNewLink_ServiceProviderList, createNewLink_ServiceProviderCB)

        // Removes the built-in cancel button (?)
        close(createNewLink_DB, false, createNewLink_CloseCB)

        // Present the dialog box
        block createNewLink_DB

        //
        // Cleanup
        //

        destroy createNewLink_DB
        createNewLink_DB = null

        if (!null createNewLink_CreatableProvidersByType)
        {
            delete createNewLink_CreatableProvidersByType
            createNewLink_CreatableProvidersByType = null
        }
    }
    else
    {
        // No OSLC providers, go straight to new external link
        createNewLink_SelectionMade = true // Implicitly
        createNewLink_ServiceProviderChoice = null
    }

    if (createNewLink_SelectionMade)
    {
        if (null createNewLink_ServiceProviderChoice)
        {
            // Present the create external link dialog
            createExtLinkDB(
                LS_("String_New_External_Link_1", NLSTEMP_("New External Link")),
                parent, null, null)
        }
        else
        {
            // Present the create collaborative/OSLC link dialog
            newCollabLink(parent, createNewLink_ServiceProviderChoice)
        }
    }
}

Re: How to create OSLC links through dxl?
Costas..Aravidis - Wed May 25 02:13:11 EDT 2016

And I'm guessing OSLC links have been set up between doors and  RQM/RM/RTC as there is a setup that you need to do before hand.

Re: How to create OSLC links through dxl?
SudarshanRao - Wed May 25 03:35:31 EDT 2016

The functions related to HTTP requests are documented in DXL Reference Manual (under Chapter 36, titled HTTP Server).
There's also an example DXL, which performs a GET on a resource (DOORSHOME\lib\dxl\example\oslc).

As I mention in the other thread, there are 2 parts to creating an OSLC link:
1. Creating a link in DOORS Object
2. Creating a backlink in the target external artifact

Creating a link in DOORS object is similar to creating an external link. The primary difference is setting the linkType, which should be one of the OSLC Link type (Validated By/Implemented By). These should be specified as represented by their namespace. Best is to check the linkType of an existing OSLC Link, so you know exactly what's required.

Creating a backlink in the target external artifact will require you to perform a GET first on it, update the body with appropriate link information and performing a PUT.

Hope that helps.

Re: How to create OSLC links through dxl?
dhars_priya - Tue Jun 07 02:49:58 EDT 2016

@SudarshanRao 7be9e89d-5964-4067-a24d-80626cf7dbdf , Thanks for the update.
We have created the link from RTC to DOORS using GET response.

But backlink is not created from DOORS to RTC.

If we use External links , it is not displaying the workitem details as do through manually​.

Is there any other way to create the OSLC link from DOORS to RTC.

 

createNewLink.inc does not give us any clue how to create OSLC links.

I think may be tha clue will be available in editCollaboration.inc file

Re: How to create OSLC links through dxl?
SudarshanRao - Thu Jun 09 22:46:08 EDT 2016

dhars_priya - Tue Jun 07 02:49:58 EDT 2016

@SudarshanRao 7be9e89d-5964-4067-a24d-80626cf7dbdf , Thanks for the update.
We have created the link from RTC to DOORS using GET response.

But backlink is not created from DOORS to RTC.

If we use External links , it is not displaying the workitem details as do through manually​.

Is there any other way to create the OSLC link from DOORS to RTC.

 

createNewLink.inc does not give us any clue how to create OSLC links.

I think may be tha clue will be available in editCollaboration.inc file

@dhars_priya b528bc91-ae36-433f-aceb-8bfd35804592,​ External Link is what you need to create in DOORS. Did you set the link type? Here's what you would need to do:

string implementedByNamespace = "http://open-services.net/ns/rm#implementedBy"
string title, desc //title and desc of link; built-in functionality uses title of WI for both
string rtcURL //URL of the WI
ExternalLink el
Object o = current
create(o, title, desc, outward, openAsURL, rtcURL, el)
linkType(el, implementedByNamespace)

I assume you're creating both links (in DOORS and in RTC) from within DOORS using DXL.

Re: How to create OSLC links through dxl?
dhars_priya - Fri Jul 15 08:06:38 EDT 2016

SudarshanRao - Thu Jun 09 22:46:08 EDT 2016

@dhars_priya b528bc91-ae36-433f-aceb-8bfd35804592,​ External Link is what you need to create in DOORS. Did you set the link type? Here's what you would need to do:

string implementedByNamespace = "http://open-services.net/ns/rm#implementedBy"
string title, desc //title and desc of link; built-in functionality uses title of WI for both
string rtcURL //URL of the WI
ExternalLink el
Object o = current
create(o, title, desc, outward, openAsURL, rtcURL, el)
linkType(el, implementedByNamespace)

I assume you're creating both links (in DOORS and in RTC) from within DOORS using DXL.

Hi, We are able to create link from DOORS to RTC and backlink we have created.

DOORS to RQM also done.

Thanks for your help @SudarshanRao.


But creating a link from RQM to DOORS is creating problem. We are able to get the OSLC response of the RQM url using GET method. But if we try to perform PUT on the same RQM url  with the same response body, we are getting error code as 400.

We are getting the following error while performing put

the uploaded content does not consist of well-formed XML or does not match the XML schema for testcase</ns2:message><ns2:trace>javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException: Content is not allowed in prolog.]

We tried adding if match header in the header part like this.

add(header,"If-Match","_3TZU50dQEea1m63qAVdzvw\") 

 

Still we are getting the same error

 

 

Also is it required to add if match header while performing put. If so please provide the details.

Re: How to create OSLC links through dxl?
SudarshanRao - Tue Jul 19 01:09:03 EDT 2016

dhars_priya - Fri Jul 15 08:06:38 EDT 2016

Hi, We are able to create link from DOORS to RTC and backlink we have created.

DOORS to RQM also done.

Thanks for your help @SudarshanRao.


But creating a link from RQM to DOORS is creating problem. We are able to get the OSLC response of the RQM url using GET method. But if we try to perform PUT on the same RQM url  with the same response body, we are getting error code as 400.

We are getting the following error while performing put

the uploaded content does not consist of well-formed XML or does not match the XML schema for testcase</ns2:message><ns2:trace>javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException: Content is not allowed in prolog.]

We tried adding if match header in the header part like this.

add(header,"If-Match","_3TZU50dQEea1m63qAVdzvw\") 

 

Still we are getting the same error

 

 

Also is it required to add if match header while performing put. If so please provide the details.

Yes, If-Match header is required whenever you are updating a resource. Value will be Etag header from the response of previous GET on the resource.

But I doubt if the error is really due to If-Match header. Maybe you should validate the RDF/XML content used for PUT in some validator to check if there's anything missing.

Re: How to create OSLC links through dxl?
Gsquare - Mon Aug 21 01:16:12 EDT 2017

Hi @SudarshanRao 7be9e89d-5964-4067-a24d-80626cf7dbdf​,

I want to create links from 9.6 DOORS classic to RQM automatically.

So i have an attirubte with the ID of the test case for each object.

how do i change the below code, so that it allows me to create links. I know it will be "ValidateBy" link type, but what will be the parameters for the create function?

string implementedByNamespace = "http://open-services.net/ns/rm#validatedBy"
string title, desc //title and desc of link; built-in functionality uses title of WI for both
string rtcURL //URL of the WI
ExternalLink el
Object o = current
create(o, title, desc, outward, openAsURL, rtcURL, el)
linkType(el, implementedByNamespace)

Re: How to create OSLC links through dxl?
Gsquare - Mon Aug 21 04:12:52 EDT 2017

Also a big question for me is:

Is it possible to create link from RQM to DOORS Classic 9.6?

Re: How to create OSLC links through dxl?
SudarshanRao - Mon Aug 21 08:01:32 EDT 2017

Gsquare - Mon Aug 21 01:16:12 EDT 2017

Hi @SudarshanRao 7be9e89d-5964-4067-a24d-80626cf7dbdf​,

I want to create links from 9.6 DOORS classic to RQM automatically.

So i have an attirubte with the ID of the test case for each object.

how do i change the below code, so that it allows me to create links. I know it will be "ValidateBy" link type, but what will be the parameters for the create function?

string implementedByNamespace = "http://open-services.net/ns/rm#validatedBy"
string title, desc //title and desc of link; built-in functionality uses title of WI for both
string rtcURL //URL of the WI
ExternalLink el
Object o = current
create(o, title, desc, outward, openAsURL, rtcURL, el)
linkType(el, implementedByNamespace)

The code will likely remain pretty much the same, except having to change the namspace URI, which you have done already. You can assign the Test Case URL to variable rtcURL, and provide values for title and description variables. 

Now, if you would like to assign a title/description based on associated Test Case, then you'll need to perform a GET, which will return RDF representation of the artifact, parse it and get the Title/description.

Another point to note - from v9.6.1.4, there's a slight change in the way links are created for RQM. It uses Link Discovery approach - where the link is written into only one application (no backlink). So the other application will "discover" links from the source application in run-time and display the same. You can read more from Backlinks and Link Discovery section in DOORS Knowledge Center. So you don't really need to worry about updating Test Case with a link pointing back to DOORS object. To enable this Link Discovery for RQM, you need to set the Minimum Client Version for DOORS Clients to be 9.6.1.4 (in Database Properties).

Hope that helps.

Re: How to create OSLC links through dxl?
Gsquare - Mon Aug 21 08:23:46 EDT 2017

SudarshanRao - Mon Aug 21 08:01:32 EDT 2017

The code will likely remain pretty much the same, except having to change the namspace URI, which you have done already. You can assign the Test Case URL to variable rtcURL, and provide values for title and description variables. 

Now, if you would like to assign a title/description based on associated Test Case, then you'll need to perform a GET, which will return RDF representation of the artifact, parse it and get the Title/description.

Another point to note - from v9.6.1.4, there's a slight change in the way links are created for RQM. It uses Link Discovery approach - where the link is written into only one application (no backlink). So the other application will "discover" links from the source application in run-time and display the same. You can read more from Backlinks and Link Discovery section in DOORS Knowledge Center. So you don't really need to worry about updating Test Case with a link pointing back to DOORS object. To enable this Link Discovery for RQM, you need to set the Minimum Client Version for DOORS Clients to be 9.6.1.4 (in Database Properties).

Hope that helps.

Thanks for the info.

I was able to create links using the code.

But why does it not show any data on selecting the link. As it does on creating manually?

Re: How to create OSLC links through dxl?
Gsquare - Thu Aug 24 02:20:51 EDT 2017

SudarshanRao - Mon Aug 21 08:01:32 EDT 2017

The code will likely remain pretty much the same, except having to change the namspace URI, which you have done already. You can assign the Test Case URL to variable rtcURL, and provide values for title and description variables. 

Now, if you would like to assign a title/description based on associated Test Case, then you'll need to perform a GET, which will return RDF representation of the artifact, parse it and get the Title/description.

Another point to note - from v9.6.1.4, there's a slight change in the way links are created for RQM. It uses Link Discovery approach - where the link is written into only one application (no backlink). So the other application will "discover" links from the source application in run-time and display the same. You can read more from Backlinks and Link Discovery section in DOORS Knowledge Center. So you don't really need to worry about updating Test Case with a link pointing back to DOORS object. To enable this Link Discovery for RQM, you need to set the Minimum Client Version for DOORS Clients to be 9.6.1.4 (in Database Properties).

Hope that helps.

@SudarshanRao 7be9e89d-5964-4067-a24d-80626cf7dbdf​: Could you please help me with the solution for why if using the below code i create validated by links, it creates a static link and i need to follow the link to get any details about the test case. But manually when i create the link using Link->New ValidatedBy it creates a link, which on mouse hover displays data of the test case?

Note: I am using doors classic 9.6.1.3 version for this and not DWA

 

string implementedByNamespace = "http://open-services.net/ns/rm#validatedBy"
string title, desc
string rqmURL
ExternalLink el
Object o = current
create(o, title, desc, outward, openAsURL, rqmURL, el)
linkType(el, implementedByNamespace)

 

@dhars_priya b528bc91-ae36-433f-aceb-8bfd35804592​:In your replies you had mentioned the same issue. How did you solve it?

Please help.

Thanks